# -*- coding: utf-8 -*-

import py_global
import logging

logger = logging.getLogger(__name__)


def lambda_expression():
    """lambda表达式"""
    a = 1
    lambda1 = lambda b, d=a: d * b
    a = 2
    lambda2 = lambda b: a * b
    # 延迟绑定late bind
    a = 3
    c = 3
    logger.info('lambda1(c)=%d', lambda1(c))
    logger.info('lambda2(c)=%d', lambda2(c))

    pass


if __name__ == '__main__':
    lambda_expression()

    pass
